package com.ruoyi.project.sdi.input.model;

import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 功能描述：
 *
 * @author 关晓强
 * @version 1.0
 * @date 2020/3/25 0:33
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ManualInputBatchInfoVo implements Serializable {

    //批次信息
    public SdiPaeaArcInput sdiPaeaArcInput;

    //影像信息
    public List<SdiImageInput> sdiImageInputList = Lists.newArrayList();

    //流水信息
    public List<PaeaDsTradeInput> paeaDsTradeInputList = Lists.newArrayList();

    //提交类型
    public boolean isCommit;

    @Data
    public static class SdiPaeaArcInput {
        private String id;
        private String code;
        private String orgCode;
        private String tellerCode;
        private Date trDate;
        private Integer imageNum;
        private String imageUrlPrefix;
        private Integer status;
    }

    @Data
    public static class SdiImageInput {
        private String id;
        private String code;
        private String type;
        private String sdifilepath;
        private String sdifilepathL;
        private Integer status;
        private String parentId;
        private String compTradeId;
        private Integer indexNo;
        private String ocrResult;
        private List<SdiImageRelTrade> sdiImageRelTradeList = Lists.newArrayList();
        private String vchNos;
        private Double txnAmt;
    }

    @Data
    public static class SdiImageRelTrade {
        private String id;
        private String vchNo;
        private Double txnAmt;
        private Integer status;
    }

    @Data
    public static class PaeaDsTradeInput {
        private String id;
        private String vchNo;
        private String ccyCode;
        private String vchSeq;
        private String brCode;
        private String tellerCode;
        private Date trDate;
        private String txnCde;
        private String accNo;
        private Double txnAmt;
        private String txnTime;
        private Integer status;
        private String imageId;
        private String tradeDesc;
        private Integer txnSeq;

        public String getTradeDesc() {
            return "流水:"+vchNo+";账号:"+accNo+";金额:"+txnAmt+";币种:"+ccyCode;
        }
    }
}
